# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.WorkloadManager.V1.Model.InstanceProperties do
  @moduledoc """
  Instance Properties.

  ## Attributes

  *   `instanceNumber` (*type:* `String.t`, *default:* `nil`) - Optional. Instance number.
  *   `machineType` (*type:* `String.t`, *default:* `nil`) - Optional. Instance machine type.
  *   `role` (*type:* `String.t`, *default:* `nil`) - Optional. Instance role.
  *   `roles` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Instance roles.
  *   `sapInstanceProperties` (*type:* `GoogleApi.WorkloadManager.V1.Model.SapInstanceProperties.t`, *default:* `nil`) - Optional. SAP Instance properties.
  *   `status` (*type:* `String.t`, *default:* `nil`) - Optional. Instance status.
  *   `upcomingMaintenanceEvent` (*type:* `GoogleApi.WorkloadManager.V1.Model.UpcomingMaintenanceEvent.t`, *default:* `nil`) - Optional. the next maintenance event on VM
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :instanceNumber => String.t() | nil,
          :machineType => String.t() | nil,
          :role => String.t() | nil,
          :roles => list(String.t()) | nil,
          :sapInstanceProperties =>
            GoogleApi.WorkloadManager.V1.Model.SapInstanceProperties.t() | nil,
          :status => String.t() | nil,
          :upcomingMaintenanceEvent =>
            GoogleApi.WorkloadManager.V1.Model.UpcomingMaintenanceEvent.t() | nil
        }

  field(:instanceNumber)
  field(:machineType)
  field(:role)
  field(:roles, type: :list)
  field(:sapInstanceProperties, as: GoogleApi.WorkloadManager.V1.Model.SapInstanceProperties)
  field(:status)

  field(:upcomingMaintenanceEvent, as: GoogleApi.WorkloadManager.V1.Model.UpcomingMaintenanceEvent)
end

defimpl Poison.Decoder, for: GoogleApi.WorkloadManager.V1.Model.InstanceProperties do
  def decode(value, options) do
    GoogleApi.WorkloadManager.V1.Model.InstanceProperties.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.WorkloadManager.V1.Model.InstanceProperties do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
